﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Madrigal.Lib
{
    public struct EquipInfo
    {
        public Int32 dwID;
        public int nOption;
        public Byte byFlag;
    }

    public struct EquipInfoAdd
    {
        public Int64 iRandomOptItemId;
        public int nRandomOptItemId;

        public PiercingInfo piercingInfo;
        public CPiercing piercing;

        public byte bItemResist;
        public int nResistAbilityOption;
        CTexture pTexture;
    }

    public partial class MoverDefine
    {
        public enum ReplaceType
        {
            Normal,
            Force,
        }

        public enum SkillUseType
        {
            Normal,
            QueueStart,
            Queueing,
        }

        public enum PVPMode
        {
            None,
            GuildWar,
            PK,
            Duel,
        }

        public enum PKType
        {
            NormalNormal,
            NormalSemi,
            NormalChao,
            SemiNormal,
            SemiSemi,
            SemiChao,
            ChaoNormal,
            ChaoSemi,
            ChaoChao,
        }

        public enum SlaughterType
        {
            Attack,
            Kill,
            Recovery,
            Set,
        }

        public enum TradeConfirmType
        {
            Error,
            OK,
        }

        public enum TradeState
        {
            Item,
            OK,
            Confirm,
        }

        public const int MaxName = 64;

        // Chat Window Colors
        public const Color PlayerChat = new Color(255, 255, 255, 255);
        public const Color NPCChat = new Color(255, 160, 160, 255);
        public const Color Monster = new Color(255, 255, 255, 160);
        public const Color Party = new Color(255, 112, 240, 112);
        public const Color GuildCombat = new Color(255, 0, 255, 0);

        // SetMotion Option
        public const int MotionOptionNone = 0x00000000;
        public const int MotionOptionSwdForce = 0x00000001;
        public const int MotionOptionFixed = 0x00000002;
        public const int MotionOptionNoTrans = 0x00000004;
        public const int MotionOptionHitSlow= 0x00000008;

        public const int ReqUseSkill = 0x00000001;
        public const int ReqMotion = 0x00000002;

        public const int ObjTypePlayer = 0x00000001;
        public const int ObjTypeMonster = 0x00000002;
        public const int ObjTypeCtrl = 0x00000004;
        public const int ObjTypeFlying = 0x00010000;

        public const int CriticalProbability = 3;
        public const int CriticalBeserkHP = 30;
        public const int CriticalBeserkProb = 22;
        public const int CriticalAfterDeath = 22;

        public const int UpdateItemNum = 0;
        public const int UpdateItemHP = 1;
        public const int UpdateItemRN = 2;
        public const int UpdateItemAO = 3;
        public const int UpdateItemRAO = 4;
        public const int UpdateItemIR = 5;
        public const int UpdateItemPiercingSize = 6;
        public const int UpdateItemPiercing = 7;
        public const int UpdateItemCoolTime = 8;
        public const int UpdateItemFlag = 9;
        public const int UpdateItemRandomOptItemID = 10;
        public const int UpdateItemKeepTime = 11;
        public const int UpdateItemRepairNum = 12;

        // Version 12 Piercing Additions
        public const int UpdateItemUltimatePiercingSize = 13;
        public const int UpdateItemUltimatePiercing = 14;

        // Version 15 PetVis
        public const int UpdateItemPetVisSize = 15;
        public const int UpdateItemPetVisItem = 16;
        public const int UpdateItemPetVisItemSwap = 17;
        public const int UpdateItemTransformVisPet = 18;

        public const int PetVisDefaultSlotSize = 2;

        public const int RestateLow = 50;

        //Version 10 Max Skill Jobs
        public const int MaxSkillJob = (MaxJobSkill + MaxExpertSkill + MaxProSkill + MaxMasterSkill + MaxHeroSkill);

        public const int AddCheerPoint = 3600; // 60 Minutes in seconds
        public const int MaxCheerPoint = 3;
        public const int NullChangeParam = 0x7fffffff;

        // Ticks measured in seconds
        public const Int32 NextTickDuel = 1;
        public const Int32 NextTickEndDuel = 90;
        public const Int32 NextTickRecovery = 2;
        public const Int32 NextTickRecoveryStand = 3;

        // Class Legend v10+
        public const int LegendClassNormal = 0;
        public const int LegendClassMaster = 1;
        public const int LegendClassHero = 2;


    }
}
